import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './assets/css/reset.css'
import store from './store'
// 引入设置rem
import './assets/js/setRem'
// 引入字体图标
import './assets/fonts/iconfont.css'
import axios from 'axios'
import { Button, Tabbar, TabbarItem, Icon, Swipe, SwipeItem, Grid, GridItem, PullRefresh, NavBar, GoodsAction, GoodsActionIcon, GoodsActionButton, Popup, Card,
  Stepper, SwipeCell, Checkbox, SubmitBar, Form, Field, ContactCard, AddressList, AddressEdit, Search, Lazyload } from 'vant'
// 引入loading插件
import loading from 'plugins/Loading'
Vue.use(loading)
/* // 引入自定义插件
import $alert from 'plugins/alert'
// 使用自定义插件
Vue.use($alert, {
  a:10,
  b:20
}) */
const img = require('./assets/img/loading.gif')

Vue.use(Button)
.use(Tabbar)
.use(TabbarItem)
.use(Icon)
.use(Swipe)
.use(SwipeItem)
.use(Grid)
.use(GridItem)
.use(PullRefresh)
.use(NavBar)
.use(GoodsAction)
.use(GoodsActionIcon)
.use(GoodsActionButton)
.use(Popup)
.use(Card)
.use(Stepper)
.use(SwipeCell)
.use(Checkbox)
.use(SubmitBar)
.use(Form)
.use(Field)
.use(ContactCard)
.use(AddressList)
.use(AddressEdit)
.use(Search)
.use(Lazyload, {
  preload: 1,
  loading: img

})

Vue.prototype.$http = axios
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
